<template>
  <div class="swiper-container" :class="pandaclass">
    <div class="swiper-wrapper">
        <slot></slot>
    </div>
    <div class="swiper-pagination"></div><!--分页器。如果放置在swiper-container外面，需要自定义样式。-->
  </div>
</template>

<script>
import Swiper from 'swiper'
import 'swiper/css/swiper.css'
export default {
  props: ['pandaobj', 'pandaclass'],
  mounted () {
    new Swiper('.' + (this.pandaclass ? this.pandaclass : 'swiper-container'),
      this.pandaobj ? this.pandaobj : {})
  }
}
</script>

<style lang="scss" scoped>
.swiper-container{
  touch-action: none;
}
</style>
